package yxy.apple.http.server.converter;

import java.util.HashMap;

import yxy.apple.http.server.business.RequestConverter;

public class ConverterImpl extends RequestConverter {

	HashMap<String, String> map = new HashMap<>();

	public ConverterImpl(Converter[] Converters) {
		for (Converter converter : Converters) {
			map.put(converter.Url, converter.Code);
		}
	}

	@Override
	public String convert(String source) {
		return map.get(source);
	}
}
